package net.dopan.pigframe.user.model.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @Package: net.dopan.pigframe.user.model.dto
 * @Title: TreeNode
 * @Description:
 * @author: 刘宽
 * @date: 2018/9/2 20:39
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TreeNode {

    protected int id;

    protected int parentId;

    protected List<TreeNode> children = new ArrayList<TreeNode>();

    public void add(TreeNode node) {
        children.add(node);
    }

}
